import React from 'react';
import {connect} from "react-redux";

class Header extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return <header className={this.props.fixed?"fixed":""}>
            <div className="header banner">
                <img src={this.props.userInfo.storeIcon}  style={{width:"3.5rem",height:"3.5rem"}}/>
                <h2>{this.props.userInfo.storeName}</h2>
                <div className="table">
                    <span>您的桌号:</span>
                    <b>{this.props.userInfo.tableType}</b>
                </div>
            </div>
        </header>
    }
}
export default connect(
    ({welcomeReducer})=>{
        return {
            userInfo:welcomeReducer.userInfo
        }     
    }
)(Header);